package com.guyan.form;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * ClassName： CategoryUpdateForm
 * Date： 2021/6/12 20:15
 *
 * @author 孤焰
 * @version 1.0
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CategoryUpdateForm {
    @NotNull(message = "id不能为null")
    private Integer id;
    private Integer parentId;
    @NotBlank(message = "类别名称不能为空")
    private String name;
    @NotNull(message = "类别状态不能为空")
    @Digits(integer = 1, fraction = 0, message = "状态值只能为1为")
    private Integer status;
    @Digits(integer = 4, fraction = 0, message = "排序编号最多为4位整数")
    private Integer sortOrder;
}